<?php
// +----------------------------------------------------------------------
// | EtrolPHP [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Author: HCZ<huangchengze@etrol.com> 
// +----------------------------------------------------------------------

namespace app\alarm\model;
use app\common\model\Base;

/**
 * 报警信息
 */
class Alarm extends Base{
	protected $name = "alarm";
	protected $createTime = "startTime";
	protected $updateTime = 'operationTime';
	
	public function sensor(){
		return $this->hasOne('app\common\model\Sensor','id','sensorId');
	}
	
	public function dangerSource(){
		return $this->hasOne('app\basic\model\Dangersource','id','dangerSourceId');
	}
}